package com.example.myworkc;

import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import android.app.Fragment;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


public class contactBlankFragment extends Fragment {
    private RecyclerView recyclerView;
    private Context context;
    private List<Map<String,Object>> items;
    private Myadapter myadapter;

    public contactBlankFragment() {
        // Required empty public constructor
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.contact_blank, container, false);
       /* context =this.getActivity();
        recyclerView=view.findViewById(R.id.recyclerview_contact);
        String[] name={"xyh","zh","pzx","wy"};
        String[] words={"","", "",""};
        int[] png={R.drawable.ganyu, R.drawable.d1,R.drawable.huiye,R.drawable.xionger};
        List<Map<String,Object>> items=new ArrayList<Map<String,Object>>();
        for(int i=0;i<name.length;i++) {
            Map<String,Object> item=new HashMap<String,Object>();
            item.put("name", name[i]);
            item.put("words", words[i]);
            item.put("png",png[i]);
            items.add(item);      }
        myadapter= new Myadapter(items,context);
        LinearLayoutManager layoutManager = new LinearLayoutManager(context);
        layoutManager.setOrientation(RecyclerView.VERTICAL);
        recyclerView.setLayoutManager(layoutManager);
        recyclerView.setAdapter(myadapter);*/
        return view;

    }
}